class Solution
{
public:
    int minimumPushes(string word)
    {
        int result = 0;
        int k = 1;
        int n = word.size();
        while (n > 0)
        {
            if (n >= 8)
            {
                n -= 8;
                result += 8 * k;
            }
            else
            {
                result += n * k;
                n = 0;
            }
            k += 1;
        }
        return result;
    }
};